<createExampleNode.controlFlowDataStructure>

Continuing from createExampleNode.13.xml

<summaryOfProblems>
	I am finding it hard to merge trees of Func that represent sizes with trees of Func that control current index in iteration, and by getting arrays from child nodes from a small constant depth, I lose the ability to calculate the iteration size before the iteration starts.

	All descendant Funcs of the one you call must do their whole iteration, or the other option is to tell it to run the next iteration part without knowing how many more there are.

	Even if we could know the iteration size before iterating, the Funcs that are used the most will be optimized as Java classes and lose that ability, or partially optimized and keep some of that ability.
</summaryOfProblems>

<goal>
	Need to stop thinking about data structures for now and define the behavior I want, then define the data structures.
</goal>

aray = a real aray in memory.
	Examples: int[], Object[], double[], Func[].
	Contains the same type of things. Specific indexs can not be defined to contain different types of things.
	Maybe: aray extends indirectAray, and indirectAray extends virtualList.

indirectAray = a real aray or an aray found recursively through child nodes.
	Maybe: aray extends indirectAray, and indirectAray extends virtualList.
	Example: virtualFloListAtIndex19 could be defined as the floListAtIndex10 aray of the current child in childListAtIndex5,
	and when iterating over childListAtIndex5, virtualFloListAtIndex19 becomes the floListAtIndex10 of a different child node each time.
	All arays can be defined as virtualAray if the root node is defined as a child of the funcState,
	and that would be faster for some calculations because arays that are not used would not have to be put in the funcState.

virtualList = like an aray but having no data lets it be much bigger. Its used for iterating over combinations of arrays and doing trees of calculations and reads/writes.
	Maybe: aray extends indirectAray, and indirectAray extends virtualList.
	(Maybe this should be combined with Func. Maybe virtualAray should be combined with aray. Many combinations are possible to be good design.)

node = constant-size obAray containing different types of arays whose sizes depend on eachother and are defined using 1 of these Func per aray:
	range(between 2 int constants)
	size*(x y)
	size^(x y)
	Node does not extend aray because aray "Contains the same type of things. Specific indexs can not be defined to contain different types of things."

virtualNode = A virtual interpretation of a + function, and real aray are only created in funcState, and funcState may contain other funcState. funcState are defined as virtual so all data in the whole software would be virtual until its copied to a file. Its similar to size* and size^ because it combines 2 things which can be different types, but is different because only 1 of those 2 things is used at a time, which would make iterating hard to define. It would allow optimizations like combining 4 size-1 floArays into 1 size-4 floAray.

funcState = All information and/or data structures and/or Funcs that a Func uses to store things in while it reads/writes things in a node. A funcState is created already containing some of these things in the node, then is the parameter of a Func call which does something to that node and/or its descendants. FuncStates may be recursive. Each funcState represents at most a small constant quantity of specific recursions. An example of constant depth specific recursion is add child of child of child's seventh flo to child of childs third flo.
	There can be many polyIndex in a funcState.

func = an object with a function that takes 1 funcState parameter (or the parts of a funcState each as a different parameter) and returns in a predictable maximum time. There may be multiple standard ways to call every Func, including:
	* Do the smallest amount of things possible.
	* Do constant-depth-recursion in 1 funcState and return any funcStates that need to be called, and allow continuing execution after you execute those funcStates separately.
	* Do the whole unpredictable-max-time variable-depth-recursion.
	Each Func has 0 or more child Funcs and that never changes.
	OPTIMIZABLE: Some trees of Func can be ***optimized as a Java class*** that does the same thing as the tree but is 1 Func that has as many parameters as the inputof the root plus the outputs of the leafs in the tree had. An optimized version of a Func can use the same types of funcState but could also create a different optimized version that uses a smaller funcState that excludes the indexs used for the middle of the calculation (Its best to remove those because they are ignored and other code may, but shouldnt, expect them to be used).
	Each func modifies the int indexs and/or aray in a polyIndex, and/or modifies the data in arays in a node.
	Example func: flo+=flo(floArayA floArayB)
	Example func: factor^(bPowerCThenMultC bPowerC c setIndexOfBHere) or maybe it should be remove^(bPowerC c setIndexOfBHere) or remove^*(bPowerCThenMultC setIndexOfBHere)

How to define constraints on the content of some arrays?
	Example: the 2 intAray in a heapQueue must always point at eachother symmetricly.
	Example: the floAray in a heapQueue must run a heapQueueFunc on floAray and 2 intArays in the heapQueue, to reorder the flo in the 2 intAray if the flo changed enough. After that func is done, the root index (is it 0 or 1?) of the first intAray must contain the int index of the max flo in floAray.

========================================

<thisIsTooMuchAboutOpimizationAndNotEnoughAboutDefiningBehavior>
	polyIndex = Data is: 1 or more int indexs in the same aray, and the aray. This avoids most of the need to have multiple variables pointing at the same aray.
		Maybe: polyIndex extends virtualList of int.
		PolyIndex may complicate the design too much and be replaced by 1 int index per 1 pointer to aray, and allow duplicate pointers to the same aray while having different or equal int indexs for it.
</thisIsTooMuchAboutOpimizationAndNotEnoughAboutDefiningBehavior>

polyIndex includes multiple int index and 1 aray. Should it also have multiple aray from the same node that are equal size?
Or should there be 2 different types of things: monoArayPolyIndex and polyArayMonoIndex?

For now, ignore efficiency and how to implement this and exactly define the behavior we want.

simpleArayGroup = the information in, but not the data structure of, these 3 arays:
	* int curIndex[any size], contains independent ints between 0 and arayAray[0].length-1.
	* int whichAray[curIndex.length], contains independent ints between 0 and arayAray.length-1.
	* Object arayAray[any size], contains any arays that are always the same size and can be different types.
This may be useful for optimizing nodes where some arays must be the same size always, but the behavior should be defined before starting on optimizations like these.

virtualNode (abbrev: vn) = The information but not data structures of...
	* a view of a single variable-size aray, and a current int index, or
	* virtualNodeA + virtualNodeB (should it allow any constant quantity of virtualNodes instead of just 2?), and a current int index from 0 to sum of their sizes - 1.
VirtualNode can give many subVirtualNodes as efficiently as String can give many substrings.

A bayesian algorithm would use:
bayesNode = vnFalseTrue + vnChilds + vnWeights + vnWeightSums
vnFalseTrue = between 2 and 2
vnChilds = between 1 and 7
vnWeights = vnFalseTrue ^ vnChilds
vnWeightSums = vnFalseTrue * vnChilds

bayesNode = vnFalseTrue + vnChilds + (vnFalseTrue^vnChilds) + (vnFalseTrue*vnChilds)

Should aray of x size y be defined as x^y?
Example: int = bit^32
Example: int[3] = (bit^32)^3
Example: Object[]{ int[3], flo[4] } = (bit^32)^3 + (definition of flo)^4

Maybe there should be no flo, and use arays of bits (often optimized as java ints) instead, converting them to flo only in the middle of calculations that need flos like java.lang.Math.sin(flo).

Define iterating over all possible int values as bit^32.
Define each specific int value as bit*32.
Define int[3] as (bit*32)^3. This definition is vague. What size loop? How many data (1 or 3) in each iteration?

Define ^ as loop.
Define * as specific value.
What should bit be defined as? Should bit be one of 0 or 1? Should bit be one of * or ^?
Should [+, *, ^] be viewed as [-1, 0, 1]?
Should [+, *, ^] be viewed as [0, 1, []]?
Or, similar to a base-negativetwo or base-negativethree or base-sqareRootOfNegativeFour positional number system,
should one of Audivolv's main data types be number whose base is defined as some combination of * and ^?
Maybe call it a base-specificValueXorLoop positional number system. I'm not sure about the Xor, but "specificValue" and "Loop" must have some logic word between them.



</createExampleNode.controlFlowDataStructure>
